﻿/* 
 * Since 2008 - 2012
 */
package com.hh.bss.oa.entity;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.common.page.impl.*;
import com.hh.bss.oa.dao.*;
import com.hh.bss.oa.entity.*;
import com.hh.bss.oa.service.*;
import com.hh.bss.oa.vo.query.*;
import com.hh.bss.util.*;



public class OaEmailSend extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;

	// alias
	public static final String TABLE_ALIAS = "OaEmailSend";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_CALL_FROM = "callFrom";
	public static final String ALIAS_CALL_ID = "callId";
	public static final String ALIAS_SEND_DT = "sendDt";
	public static final String ALIAS_SUBJECT = "subject";
	public static final String ALIAS_SENDER = "sender";
	public static final String ALIAS_RECIEVER = "reciever";
	public static final String ALIAS_CONTENT = "content";

	// date formats
	public static final String FORMAT_SEND_DT = DATE_FORMAT;

	// 可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	// columns START

	private java.lang.Integer id;
	@Length(max = 20)
	private java.lang.String callFrom;

	private java.lang.Integer callId;

	private java.util.Date sendDt;
	@Length(max = 255)
	private java.lang.String subject;
	@Length(max = 100)
	private java.lang.String sender;
	@Length(max = 255)
	private java.lang.String reciever;
	private java.lang.String ccreciever;
	private java.lang.String bccreciever;
	
	private boolean replysign = false; // 默认不需要

	public boolean isReplysign() {
		return replysign;
	}

	public void setReplysign(boolean replysign) {
		this.replysign = replysign;
	}

	public java.lang.String getCcreciever() {
		return ccreciever;
	}

	public void setCcreciever(java.lang.String ccreciever) {
		this.ccreciever = ccreciever;
	}

	public java.lang.String getBccreciever() {
		return bccreciever;
	}

	public void setBccreciever(java.lang.String bccreciever) {
		this.bccreciever = bccreciever;
	}

	@Length(max = 65535)
	private java.lang.String content;
	// columns END

	private String cvName;
	private String jobName;
	private String recieverName;

	private String tRecieverName;
	private String attachment;
	private String attachment2;
	private String attachmentName;
	private String attachment2Name;
	
	private String creator;
	
	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String gettRecieverName() {
		return tRecieverName;
	}

	public void settRecieverName(String tRecieverName) {
		this.tRecieverName = tRecieverName;
	}

	public String getAttachmentName() {
		return attachmentName;
	}

	public void setAttachmentName(String attachmentName) {
		this.attachmentName = attachmentName;
	}

	public String getAttachment2Name() {
		return attachment2Name;
	}

	public void setAttachment2Name(String attachment2Name) {
		this.attachment2Name = attachment2Name;
	}

	private String cvId;
	private String jobId;

	public String getCvId() {
		return cvId;
	}

	public void setCvId(String cvId) {
		this.cvId = cvId;
	}

	public String getJobId() {
		return jobId;
	}

	public void setJobId(String jobId) {
		this.jobId = jobId;
	}

	public String getAttachment() {
		return attachment;
	}

	public String getAttachment2() {
		return attachment2;
	}

	public void setAttachment2(String attachment2) {
		this.attachment2 = attachment2;
	}

	public void setAttachment(String attachment) {
		this.attachment = attachment;
	}

	public String getCvName() {
		return cvName;
	}

	public void setCvName(String cvName) {
		this.cvName = cvName;
	}

	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public String getRecieverName() {
		return recieverName;
	}

	public void setRecieverName(String recieverName) {
		this.recieverName = recieverName;
	}

	public OaEmailSend() {
	}

	public OaEmailSend(java.lang.Integer id) {
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}

	public java.lang.Integer getId() {
		return this.id;
	}

	public void setCallFrom(java.lang.String value) {
		this.callFrom = value;
	}

	public java.lang.String getCallFrom() {
		return this.callFrom;
	}

	public void setCallId(java.lang.Integer value) {
		this.callId = value;
	}

	public java.lang.Integer getCallId() {
		return this.callId;
	}

	public String getSendDtString() {
		return DateConvertUtils.format(getSendDt(), FORMAT_SEND_DT);
	}

	public void setSendDtString(String value) {
		setSendDt(DateConvertUtils.parse(value, FORMAT_SEND_DT, java.util.Date.class));
	}

	public void setSendDt(java.util.Date value) {
		this.sendDt = value;
	}

	public java.util.Date getSendDt() {
		return this.sendDt;
	}

	public void setSubject(java.lang.String value) {
		this.subject = value;
	}

	public java.lang.String getSubject() {
		return this.subject;
	}

	public void setSender(java.lang.String value) {
		this.sender = value;
	}

	public java.lang.String getSender() {
		return this.sender;
	}

	public void setReciever(java.lang.String value) {
		this.reciever = value;
	}

	public java.lang.String getReciever() {
		return this.reciever;
	}

	public void setContent(java.lang.String value) {
		this.content = value;
	}

	public java.lang.String getContent() {
		return this.content;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("Id", getId()).append("CallFrom", getCallFrom()).append("CallId", getCallId()).append("SendDt", getSendDt()).append("Subject", getSubject()).append("Sender", getSender()).append("Reciever", getReciever()).append("Content", getContent()).toString();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(getId()).toHashCode();
	}

	public boolean equals(Object obj) {
		if (obj instanceof OaEmailSend == false)
			return false;
		if (this == obj)
			return true;
		OaEmailSend other = (OaEmailSend) obj;
		return new EqualsBuilder().append(getId(), other.getId()).isEquals();
	}
}
